<?php

class Pages extends CI_Controller{

    function view($page='home'){

        $this->load->helper('url');



        if (!file_exists('application/views/pages/'.$page.'.php'))
        {
            show_404();
        }

        $menu = 'navigation';
        $logged_in = $this->session->userdata('validated');
        if($logged_in==true)
        {
            $menu = 'navigation_logged';
        }

        $this->load->view('templates/header');
        $this->load->view('templates/'.$menu);
        $this->load->view('pages/'.$page);
        $this->load->view('templates/footer');


    }


}

?>